#include "csgdiff.h"

CSGDiff::CSGDiff()
{
}

double CSGDiff::doCSGOperation(double fImplicitValue0 , double fImplicitValue1){
    double dValue;

    fImplicitValue1 = -fImplicitValue1;

    /*
    if(fImplicitValue0 * fImplicitValue1 > 0){
        //If the point is inside or outside both solids, give the minor value to garantee smoothness.
        dValue = fImplicitValue0;
    }
    else{*/
        dValue = (fImplicitValue0 >= fImplicitValue1) ? fImplicitValue0 : fImplicitValue1;
    //}
    return dValue;
}
